
<h2>Saldo E-Wallet</h2>
<div class="list">
<table cellpadding="0" cellspacing="0">
        <tr>
            <th >Cash</th>
            <th >Terpakai</th>
            <th >Saldo</th>
        </tr>
        <tr>
            <td><?php echo number_format($saldo->ewallet_cash_acc);?></td>
            <td><?php echo number_format($saldo->ewallet_cash_paid);?></td>
            <td><?php echo number_format($saldo->ewallet_cash_acc-$saldo->ewallet_cash_paid);?></td>
        </tr>
        </table>
    </div>
<br />
<h2>Log Withdraw Ewallet</h2>
<!--<div class="add">
    <form action="" method="post" name="member_form">
        <table cellpadding="0" cellspacing="0">
            <tr class="title">
                <th colspan="5" style="text-align:left;"><strong>&nbsp;</strong></th>
            </tr>
            <tr>
                <th width="80">Lihat data</th>
                <td width="100" class="no-border">
                    <?php
//                    $this->widget('zii.widgets.jui.CJuiDatePicker', array(
//                        'value'=>$date_start,
//                        'name' => 'date_start',
//                        'options' => array(
//                            'showAnim' => 'fold',
//                            'dateFormat' => 'yy-mm-dd', // save to db format
//                            'altField' => '#self_pointing_id',
//                            'altFormat' => 'yy-mm-dd', // show to user format
//                            'changeYear' => true,
//                        ),
//                        'htmlOptions' => array(
//                            'style' => 'padding:3px 4px;',
//                            'size' => 10,
//                        ),
//                    ));
                    ?>
                </td>
                <td width="10" class="no-border">s.d.</td>
                <td width="100" class="no-border"><?php
//                    $this->widget('zii.widgets.jui.CJuiDatePicker', array(
//                        'value'=>$date_end,
//                        'name' => 'date_end',
//                        'options' => array(
//                            'showAnim' => 'fold',
//                            'dateFormat' => 'yy-mm-dd', // save to db format
//                            'altField' => '#self_pointing_id',
//                            'altFormat' => 'yy-mm-dd', // show to user format
//                            'changeYear' => true,
//                        ),
//                        'htmlOptions' => array(
//                            'style' => 'padding:3px 4px;',
//                            'size' => 10,
//                        ),
//                    ));
                    ?></td>
                <td class="no-border"><input type="submit" name="search" class="button" value="Tampilkan" /></td>
            </tr>
        </table>
    </form>
</div>-->
<br />
<div class="list">
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th >Tanggal</th>
            <th >Nominal</th>
            <th >Status</th>
        </tr>
        
        <?php
        if ($model) {
            $saldo = $total = 0;
            foreach ($model as $row) {
                $status = ($row->ewallet_withdrawal_is_approve == '1') ? "Transfered" : "Pending";
                ?>
                <tr>
                    <td align="center"><?php echo $row->ewallet_withdrawal_datetime; ?></td>
                    <td align="right"><?php echo number_format($row->ewallet_withdrawal_value); ?></td>
                    <td align="center"><?php echo $status; ?></td>
                </tr>
                <?php
                $total = $total + $row->ewallet_withdrawal_value;
            }
            ?>
                 <tr>
                    <td align="center"><b>T O T A L</b></td>
                    <td align="right"><?php echo number_format($total); ?></td>
                    <td align="center">-----====-----</td>
                </tr>
            <?php
        } else {
            ?>
            <tr>
                <td align="center" colspan="5"><b>DATA KOSONG</b></td>
            </tr>
            <?php
        }
        ?>
    </table>
</div>